Direct Memory Access

intrinsics

SBYTEAT()
UBYTEAT()
SSHORTAT()
USHORTAT()
SLONGAT()
ULONGAT()
XLONGAT()
GIANTAT()
SINGLEAT()
DOUBLEAT()

double = DOUBLEAT( address )
double = DOUBLEAT( address, offset )
double = DOUBLEAT( address, [ element ])
DOUBLEAT( address ) = double
DOUBLEAT( address, offset ) = double
DOUBLEAT( address, [ element ]) = double

The Direct Memory Access intrinsics read directly from a memory address, or write directly to a memory address. They are provided for the rare cases it is necessary to read or write a memory address directly, as when the operating system or another language provides an address of data, rather than data itself.

Address validation is not performed, so misaligned accesses, segment faults, and other memory access errors are not prevented. Therefore these intrinsics should be avoided when possible, and used with care.
The name of any direct memory access intrinsic can be substituted for DOUBLEAT in any of the six syntax examples shown above.

The first three forms read from a memory address, while the second three forms write to a memory address.

The address is specified in one of three ways:

address                     address = address
address, offset          address = address + offset
address, [ element ]     address = address + ( element * size )

In the first form, the address is given directly. In the second form, the address is computed by adding a byte offset to the address. In the third form, the address is computed by adding the element number times its size in bytes to the address.

a# = DOUBLEAT(address)
a# = DOUBLEAT(address, offset)
a# = DOUBLEAT(address, [element])
DOUBLEAT(address) = a#
DOUBLEAT(address, offset) = a#
DOUBLEAT(address, [element]) = a#